The World Wide Web Consortium (W3C) introduced the CSS2 recommendation in October 1998. This amalgamated the CSS1 recommendation and the CSSP draft, and extended both with new concepts, new selectors and new properties. Here is a brief overview of what's new, with links to other parts of this guide which cover these in more detail.
Web pages aren't just displayed on PC monitors. CSS2 allows different media (TVs, handheld devices and so on) to be targeted by one style sheet. Read our section on media for all the details.
CSS2 brings sophisticated printing options, that enable pages to be defined (size, margin, orientation), and allow control over page breaking and widow and orphan issues. You can even print crop marks. Read our section on printing for the full story.
CSS2 allows content o be inserted before or after elements. See the section on generated content for more.
CSS2 introduces several new selectors to give even more control over selecting elements on a page.
Child selectors are similar to contextual selectors, but go a step further. With contextual selectors, an element must be a descendent of another element, but it might be deeply nested. Child selectors select only the direct children of an element.
Want to select only the first paragraph of a section? With the first child selector now you can.
Attribute selectors are like class and id selectors on steroids. Select an element if it has any specified attribute set at all, or set to a specific value.
Adjacent selectors allow you to select elements that immediately follow other elements.
With CSS2, any element can be a table or part of a table! The row and column selectors help select the rows and columns of a table.
CSS2 introduces a number of new properties.
font-family can now be specified as one of several system fonts. This helps build user interfaces that look like the target operating system.
Font sizes can now be adjusted so that when substitute fonts are used, the relative size of those fonts is much like that of the first choice font.
Control the shape of the cursor when it is over an element using the cursor property.
create outlines around elements, using the new outline property.
Instead of relying on positioning to create text shadow effects, this property allows for built-in text shadows to be created using CSS2.